//
//  HRRecordAudioViewModel.h
//  Hear
//
//  Created by mac on 2017/3/31.
//  Copyright © 2017年 mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AudioToolBox/AudioToolBox.h"

@interface HRRecordAudioViewModel : NSObject

- (void)recorlAudio; //
- (void)checkRecord; // 检查录制权限

@property (nonatomic, retain) AVAudioPlayer *audioPlayer;
@property (nonatomic, retain) AVAudioRecorder *audioRecorder;

- (void)playAudioBlock:(BOOL)playAudio;  // 播放语音

@property (nonatomic, strong) void(^recordAudioStopBlock)();// 停止录音


@property (nonatomic, strong) void(^addEnditBlock)();
@property (nonatomic, strong) void(^audioPlayerDidFinishPlaying)();

- (void)addMusicName:(NSString *)musicName;

@property (nonatomic, copy) NSString *outPutFilePath; // 合成声音
@property (nonatomic, copy) NSString *mp3Path;
@property (nonatomic, assign) CGFloat audioLength;

- (void)removeRecord;
- (void)startRecord;
- (void)playRecordingWithPath:(NSString *)RecordPath;
- (void)pause;
- (void)stopRecord;

@end
